import 'package:fish_redux/fish_redux.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';

import 'entity/message_entity.dart';

class MessageState implements Cloneable<MessageState> {

  EasyRefreshController easyRefreshController;
  int page = 1;
  List<MessageEntity> items;

  @override
  MessageState clone() {
    return MessageState()
      ..page = page
      ..items = items
      ..easyRefreshController = easyRefreshController;
  }
}

MessageState initState(Map<String, dynamic> args) {
  return MessageState()
    ..items = []
    ..page = 1
    ..easyRefreshController = EasyRefreshController();
}
